import Vue from 'vue'
import Vuex from 'vuex'
//1.导入插件
import VuexPersistence from 'vuex-persist'
//2. 创建对象进行配置

//配置存储介质，默认持久化到本地存储中
const vuexLocal = new VuexPersistence({
  storage: window.localStorage,
})

Vue.use(Vuex)

export default new Vuex.Store({
  state: {

  },
  mutations: {

  },
  actions: {},
  getters: {

  },
  modules: {},

  plugins: [vuexLocal.plugin],//引入插件
})
